{% extends "base.html" %}
{% block title %}{{ _('Index') }}{% endblock %}
{% block css %}
    <link href="{{ url_for('static', filename='css/dashboard.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
{% endblock %}
{% block body %}
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container-fluid" ng-init="isCollapsed=true">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"
                        ng-click="isCollapsed = !isCollapsed">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{{ url_for('index') }}">{{ _('Agcompany') }}</a>

            </div>
            <div class="navbar-collapse" collapse="isCollapsed">
                <ul class="nav navbar-nav">
                    <li class="btn-group" dropdown>
                        <a href="javascript:" class="btn dropdown-toggle">
                            {{ _('User management') }}<span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="{{ url_for('userlist') }}">{{ _('Users') }}</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <!-- Split button -->
                    <li class="btn-group" dropdown>
                        {#                    <li class="btn-group" dropdown style="padding-top: 10px">#}
                        {#                        <button href="#" class="btn btn-danger">{{ current_user }}</button>#}
                        {#                        <button href="#" class="btn btn-danger dropdown-toggle">#}
                        {#                            <span class="caret"></span>#}
                        {#                            <span class="sr-only">Split button!</span>#}
                        {#                        </button>#}
                        <a href="javascript:" class="btn">{{ current_user }}</a>
                        <a href="javascript:" class="btn dropdown-toggle">
                            <span class="caret"></span>
                            <span class="sr-only">Split button!</span>
                        </a>
                        <ul class="dropdown-menu" role="menu">
                            <li ng-controller="changePwdCtrl">
                                <a href="javascript:" ng-click="open()">{{ _('Change password') }}</a></li>

                            <li class="divider"></li>
                            <li><a href="/admin" target="_self">{{ _('Admin') }}</a></li>
                            <li><a href="{{ url_for('logout') }}" target="_self">{{ _('Logout') }}</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-3 col-md-2 col-lg-1 sidebar">
                <ul class="nav nav-sidebar panel-info">
                    <li class="panel-heading">{{ _('User management') }}</li>
                    <li ng-class="menu.userlist"><a href="{{ url_for('userlist') }}">{{ _('Users') }}</a></li>
                    <li ng-class="menu.rolelist"><a href="{{ url_for('rolelist') }}">{{ _('Roles') }}</a></li>
                </ul>
            </div>
            <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 col-lg-11 col-lg-offset-1 main" ng-view>

            </div>
        </div>
    </div>
{% endblock %}